﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SharpSoft.WPF.Controls
{
    /// <summary>
    /// Searcher.xaml 的交互逻辑
    /// </summary>
    public partial class Searcher : DockPanel
    {
        public Searcher()
        {
            //DefaultStyleKeyProperty.OverrideMetadata(typeof(Searcher), new FrameworkPropertyMetadata(typeof(Searcher)));
            InitializeComponent();
        }


        public string SearchText
        {
            get { return (string)GetValue(SearchTextProperty); }
            set { SetValue(SearchTextProperty, value); }
        }

        public static readonly DependencyProperty SearchTextProperty =
            DependencyProperty.Register("SearchText", typeof(string), typeof(Searcher), new PropertyMetadata(""));


        public event System.Windows.RoutedEventHandler SearchClick;

        private void ImageButton_Click(object sender, RoutedEventArgs e)
        {
            SearchClick?.Invoke(this, e);
        }
    }
}
